// SetInitialSpeedDialog.cpp : implementation file
//

#include "stdafx.h"
#include "remotetracker.h"
#include "SetInitialSpeedDialog.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSetInitialSpeedDialog dialog


CSetInitialSpeedDialog::CSetInitialSpeedDialog(CWnd* pParent , CRemoteTrackerDoc* doc)
	: CDialog(CSetInitialSpeedDialog::IDD, pParent)
{
	this->doc = doc;
	//{{AFX_DATA_INIT(CSetInitialSpeedDialog)
	m_initialSpeed = doc->getInitialSpeed();
	//}}AFX_DATA_INIT
	
	//UpdateData(FALSE);
}


void CSetInitialSpeedDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSetInitialSpeedDialog)
	DDX_Text(pDX, IDC_EDIT1, m_initialSpeed);
	DDV_MinMaxInt(pDX, m_initialSpeed, 1, 500);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CSetInitialSpeedDialog, CDialog)
	//{{AFX_MSG_MAP(CSetInitialSpeedDialog)
	ON_EN_CHANGE(IDC_EDIT1, OnChangeEdit1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSetInitialSpeedDialog message handlers

void CSetInitialSpeedDialog::OnOK() 
{
	// TODO: Add extra validation here
		
	CDialog::OnOK();
}

int CSetInitialSpeedDialog::getInitialSpeed(){
	return m_initialSpeed;
}

void CSetInitialSpeedDialog::OnChangeEdit1() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);
}
